Class TKPoint
The TKPoint provides a TuneKit data type to deal with points in 2D space and some utilities to work with them, such as figuring out
the distance between two points.
Defined in: Utils.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
TKPoint(x, y)
|
| Field Attributes | Field Name and Description |
|---|---|
|
The x coordinate.
|
|
|
The y coordinate.
|
| Method Attributes | Method Name and Description |
|---|---|
distanceToPoint(aPoint)
Provides the distance between this point and another.
|
Class Detail
TKPoint(x, y)
- Parameters:
- {float} x
- The x coordinate.
- {float} y
- The y coordinate.
- Since:
- TuneKit 1.0
Field Detail
{float}
x
The x coordinate.
{float}
y
The y coordinate.
Method Detail
{float}
distanceToPoint(aPoint)
Provides the distance between this point and another.
- Parameters:
-
{
TKPoint} aPoint - The point to which we'd like to figure out the distance.
- Returns:
- {float} The distance between the receiver the provided point.